package com.gxsyh.nantie.order.provider.service.impl;

import com.gxsyh.nantie.order.provider.domain.TbUserOrder;

import javax.annotation.Resource;
import com.gxsyh.nantie.order.provider.mapper.TbUserOrderMapper;
import com.gxsyh.nantie.order.provider.TbUserOrderService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @email yom535@outlook.com
 * @author: 刘锋嘉(Liu Fengjia)
 * @date: 2020/2/26
 * @time: 09:13
 * @Description: 
 */
@Transactional
@Service(version = "1.0.0")
public class TbUserOrderServiceImpl implements TbUserOrderService{

    @Resource
    private TbUserOrderMapper tbUserOrderMapper;

    @Override
    public int insterUserOrder(Long id, Long userId, Long orderId) {
        TbUserOrder tbUserOrder=new TbUserOrder();
        tbUserOrder.setId(id);
        tbUserOrder.setUserId(userId);
        tbUserOrder.setOrderId(orderId);
        return tbUserOrderMapper.insert(tbUserOrder);
    }
}